home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Programs 1995 Summer
/
Linux Programs.iso
/
ghostscr
/
gs_2.6
/
gs_2
/
usr
/
bin
/
ps2ascii
< prev
next >
Wrap
Text File
|
1994-05-09
|
563b
|
14 lines
#!/bin/sh -f
# Extract ASCII text from a PostScript file. Usage:
# ps2ascii [infile.ps [outfile.txt]]
# If outfile is omitted, output goes to stdout.
# If both infile and outfile are omitted, ps2ascii acts as a filter,
# reading from stdin and writing on stdout.
if ( test $# -eq 0 ) then
gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps - quit.ps
elif ( test $# -eq 1 ) then
gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps $1 quit.ps
else
gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps $1 quit.ps >$2
fi